package serviceImpl;

import dao.IMovieTheatreDao;
import models.MovieTheatre;

import java.util.Date;
import java.util.List;

/**
 * Created by 国彬 on 2016/7/10.
 */
public class MovieTheatreDaoImpl implements IMovieTheatreDao {

    @Override
    public List findByMovieIdDate(String movieId, Date date) {
        return MovieTheatre.find("select m2.name,m2.id from MovieTheatre m1,Theatre m2 where m1.movieId=? and m1.startTime>=? and m1.theatreId=m2.id",movieId,date).fetch(10);
    }
}
